import cv2 as cv
from tqdm import tqdm

if __name__ == '__main__':

    for i in tqdm(range(1, 11)):
        # print("%02d" % (i,))
        prefix = "%02d" % (i,)

        in_file = 'data/10pose/{}.png'.format(prefix)
        img = cv.imread(in_file, cv.IMREAD_UNCHANGED)

        out_file = 'data/alpha/{}.png'.format(prefix)
        cv.imwrite(out_file, img[:, :, 3])

        for j in range(10):
            ch = chr(ord('A') + j)
            # print(ch)

            in_file = 'data/10pose/{}{}.png'.format(prefix, ch)
            img = cv.imread(in_file, cv.IMREAD_UNCHANGED)

            out_file = 'data/alpha/{}{}.png'.format(prefix, ch)
            cv.imwrite(out_file, img[:, :, 3])
